stage.set_background("park")
sprite = codesters.Sprite("person3")
sprite.glide_to(-100, 50)
# sprite = codesters.Text("text", x, y, "color")
text = codesters.Text("I went to the park!", 0, -200, "blue")
t = codesters.Teacher()
try:
tval1 = t.find_function('wait')[0][0]
except:
tval1 = "DNE"
try:
tval2 = t.find_function('move_right')[0][0]
except:
tval2 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 < tval2, "Great job!")
t1.add_failure(tval1 == "DNE", "Did you add a Wait command?")
t1.add_failure(tval1 > tval2, "Oops! Try placing your Wait command before your Move Right command.")
t2 = TestObjective()
t2.add_success(tval2 != "DNE" and tval1 < tval2, "Great job!")
t2.add_failure(tval2 == "DNE", "Did you add a Move Right command?")
tester = TestManager()
tester.add_test_list([t1, t2])
tester.run_tests()
tester.display_first_feedback()
-
Run Code
-
Activity Submitted!
Submit Work
-
Next Activity
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)